/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tofc.chart;

import tofc.value.StackCol;
import tofc.value.StackKey;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author p476733
 */
public class StackBar extends BaseXYChart{
    private List<List> values;
    private List<String> colours;
    private Number alpha;
    private String tip;
    private String type;
    private List<StackKey> keys;
    private String onClick;

    public String getOnClick() {
        return onClick;
    }

    public void setOnClick(String onClick) {
        this.onClick = onClick;
    }

    public List<List> getValues() {
        return values;
    }

    public void setValues(List<List> values) {
        this.values = values;
    }


    public List<StackKey> getKeys() {
        return keys;
    }

    public void setKeys(List<StackKey> keys) {
        this.keys = keys;
    }

    public StackBar() {
        this.type = "bar_stack";
        this.values = new ArrayList();
        this.colours = new ArrayList();
        this.keys = new ArrayList();
    }

    public void setColours(List<String> colours) {
        this.colours = colours;
    }
    public void setColours(String... colours){
        this.colours.clear();
        for(int i =0;i< colours.length;i++){
            this.colours.add(colours[i]);
        }
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        this.tip = tip;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setNumberLists(List<Number>... values){
        this.values.clear();
        for(int i=0;i<values.length;i++){
            this.values.add(values[i]);
        }
    }

    public void setStackLists(List<StackCol>... values){
        this.values.clear();
        for(int i=0;i<values.length;i++){
            this.values.add(values[i]);
        }
    }

    public void addNumbers(List<Number> values) {
        this.values.add(values);
    }

    public void addStacks(List<StackCol> values){
        this.values.add(values);
    }

    public void addValue(int index, Number value){
        this.values.get(index).add(value);
    }

    public void addValue(int index, StackCol value){
        this.values.get(index).add(value);
    }

    public void setValue(int index, int position, Number value){
        this.values.get(index).set(position, value);
    }

    public void setValue(int index, int position, StackCol value){
        this.values.get(index).set(position, value);
    }

    public Number getAlpha() {
        return alpha;
    }

    public void setAlpha(Number alpha) {
        this.alpha = alpha;
    }

    public List getColours() {
        return colours;
    }

}
